Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

555
Vistas
How to activate a Conda Environment from the "sh" shell (on Nodejs)?

I can activate the Conda Environment with any problems from the bash shell. I can use this two options on bash:

source activate env_name
. activate env_name

But I am using the method exec of Node to run the activation of the environment. Node uses sh shell in order to run commands. I tried the commands above, but they did not work. I got this error

/bin/sh: 1: /env_name/bin/source: not found

So I had to use this command to run the environment

const child_process = require('child_process')
child_process.exec('bash -c "source activate env_name"')

Is there a better way to do this to make it work on Ubuntu?

I run this on Windows and it is enough to make it work

child_process.exec('activate env_name')
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Conda doesn't do well right now (in conda 4.3.x) with shells that aren't "advanced" like bash and zsh. Pure posix dash and the busybox shells, for example, don't work right now.

Good new though... They soon will. Support for a larger variety of shells is a feature of conda 4.4. The base PR for this work was https://github.com/conda/conda/pull/5044, and there are several follow-ons.

Conda 4.4.0 should be released into canary in the next several weeks.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda